Fix 9669 - Crash when running a simulation with MultiZoneWithoutDistribution and fan#11383
Merged
mitchute merged 2 commits intoNatLabRockies:developfrom Jan 8, 2026
Conversation
tanaya-mankad
approved these changes
Dec 19, 2025
rraustad
reviewed
Jan 7, 2026
|
|
||
| for (AirLoopNum = 1; AirLoopNum <= NumPrimaryAirSys; ++AirLoopNum) { | ||
| if (DisSysNumOfCVFs == 0) { | ||
| if (DisSysNumOfCVFs == 0 || !distribution_simulated) { |
Collaborator
There was a problem hiding this comment.
This looks like a good fix. I guess another way would be to make sure whatever array crashed (assuming that is what happened) was allocated? This is probably the easiest and cleanest fix, so this is good.
CurrentModuleObject = "AirflowNetwork:Distribution:Component:Fan";
DisSysNumOfCVFs = m_state.dataInputProcessing->inputProcessor->getNumObjectsFound(m_state, CurrentModuleObject);
I wonder if other components could cause the same type of crash? Maybe not since the AFN Coil component works in the unit test. For example:
AirflowNetwork:Distribution:Component:HeatExchanger
AirflowNetwork:Distribution:Component:TerminalUnit
Collaborator
There was a problem hiding this comment.
Agreed. This looks OK. distribution_simulated is checked in a bunch of different places, so this is inline with what we're already doing.
rraustad
approved these changes
Jan 7, 2026
mitchute
approved these changes
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request overview
Description of the purpose of this PR
When distribution_simulated is false, LoopOnOffFanRunTimeFraction is not allocated so these nested loops can be skipped. Even if we instead allocate LoopOnOffFanRunTimeFraction, the default value of 0 still wouldn't meet the conditions for anything to reported so I just added a check for !distribution_simulated.
Pull Request Author
Reviewer